import { ReactNode } from 'react'

import { PageEmpty } from '@/components/PageEmpty'

export const Auth = ({ codes, children }: { codes: [string, ...string[]]; children: ReactNode }) => {
  if (codes.some(code => code === '1')) return <>{children}</>

  return <PageEmpty type="noPermission" />
}
